package com.ruoyi.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 论坛对象 forum_post
 * 
 * @author lsx
 * @date 2025-01-07
 */
public class ForumPost
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Integer id;

    /** 用户ID */
    private Integer userId;

    /** 帖子标题 */
    private String title;

    /** 内容 */
    private String content;

    /** 图片地址，多张图片以“||”分割 */
    private String imageUrl;

    /** 点赞数 */
    private Integer praise;

    /** 股票ID（可选，用于关联特定股票） */
    private Integer stockId;

    /** 创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setUserId(Integer userId) 
    {
        this.userId = userId;
    }

    public Integer getUserId() 
    {
        return userId;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setImageUrl(String imageUrl) 
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() 
    {
        return imageUrl;
    }
    public void setPraise(Integer praise) 
    {
        this.praise = praise;
    }

    public Integer getPraise() 
    {
        return praise;
    }
    public void setStockId(Integer stockId) 
    {
        this.stockId = stockId;
    }

    public Integer getStockId() 
    {
        return stockId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("createTime", getCreateTime())
            .append("imageUrl", getImageUrl())
            .append("praise", getPraise())
            .append("stockId", getStockId())
            .toString();
    }
}
